$(function() {
	load_indiServiceCost_select();
	load_indiServiceCost_cond_select();
	load_indiService_select();
	
	_addChangeListener("#indiServiceCost_select", function() {
		var option = $('#indiServiceCost_select option:selected');
		if(view && view.data) {view.data.serviceName = option.text();}
	});
});

function load_indiServiceCost_select() {
	if($('#indiServiceCost_select').length==0) {return;}

	$('#indiServiceCost_select').html('<option value="" selected></option>');

	findAll_basic(path+'/indiServiceCost/findAll', function(response) {
		for(var i=0; i<response.data.length; i++) {
			$('#indiServiceCost_select').append('<option value="' + response.data[i].indiServiceCostId
				+ '">' + response.data[i].serviceName + '</option>');
		}
	});
}

function load_indiServiceCost_cond_select() {
	if($('#indiServiceCost_cond_select').length==0) {return;}

	$('#indiServiceCost_cond_select').html('<option value="" selected></option>');

	findAll_basic(path+'/indiServiceCost/findAll', function(response) {
		for(var i=0; i<response.data.length; i++) {
			$('#indiServiceCost_cond_select').append('<option value="' + response.data[i].indiServiceCostId
				+ '">' + response.data[i].serviceName + '</option>');
		}
	});
}

function load_indiService_select() {
	if($('#indiService_select').length==0) {return;}

	$('#indiService_select').html('<option value="" selected></option>');

	findAll_basic(path+'/indiServiceCost/findAll', function(response) {
		for(var i=0; i<response.data.length; i++) {
			$('#indiService_select').append('<option value="' + response.data[i].indiServiceCostId
				+ '">' + response.data[i].serviceName + '</option>');
		}
		
		_addChangeListener("#indiService_select", function() {
			var option = $('#indiService_select option:selected');
			if(view && view.data) {view.data.indiServiceName = option.text();}
		});
	});
}
